package com.smartwebx.ha.dal.usebean;

import java.util.Date;

import org.apache.commons.lang3.time.DateFormatUtils;

import com.google.common.base.Objects;

public class SplitDateAndTimePointBean {
	private String operatType;
	private Date startDate;
	private Date endDate;
	private Date sstartHour;
	private Date sendHour;
	private Date startHour;
	private Date endHour;

	public SplitDateAndTimePointBean(String operatType, Date startDate, Date endDate,
			Date startHour, Date endHour,Date sstartHour, Date sendHour) {
		super();
		this.operatType = operatType;
		this.startDate = startDate;
		this.endDate = endDate;
		this.startHour = startHour;
		this.endHour = endHour;
		this.sstartHour = sstartHour;
		this.sendHour = sendHour;
	}

	public String getOperatType() {
		return operatType;
	}

	public void setOperatType(String operatType) {
		this.operatType = operatType;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Date getSstartHour() {
		return sstartHour;
	}

	public void setSstartHour(Date sstartHour) {
		this.sstartHour = sstartHour;
	}

	public Date getSendHour() {
		return sendHour;
	}

	public void setSendHour(Date sendHour) {
		this.sendHour = sendHour;
	}

	public Date getStartHour() {
		return startHour;
	}

	public void setStartHour(Date startHour) {
		this.startHour = startHour;
	}

	public Date getEndHour() {
		return endHour;
	}

	public void setEndHour(Date endHour) {
		this.endHour = endHour;
	}

	@Override
	public String toString() {

		return Objects
				.toStringHelper(this)
				.add("operatType", operatType)
				.add("startDate",
						startDate == null ? null
								: DateFormatUtils.ISO_DATETIME_FORMAT
										.format(startDate))
				.add("endDate",
						endDate == null ? null
								: DateFormatUtils.ISO_DATETIME_FORMAT
										.format(endDate))
				.add("startHour",
						startHour == null ? null
								: DateFormatUtils.ISO_DATETIME_FORMAT
										.format(startHour))
				.add("endHour",
						endHour == null ? null
								: DateFormatUtils.ISO_DATETIME_FORMAT
										.format(endHour))
				.add("sstartHour",
						sstartHour == null ? null
								: DateFormatUtils.ISO_DATETIME_FORMAT
										.format(sstartHour))
				.add("sendHour",
						sendHour == null ? null
								: DateFormatUtils.ISO_DATETIME_FORMAT
										.format(sendHour)).toString();
	}
}
